package com.mc.api.controller;

import com.alibaba.fastjson.JSONArray;
import com.mc.api.domain.SysAppVersion;
import com.mc.api.service.ISysAppVersionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/system/version")
public class SysAppVersionController {

    @Autowired
    private ISysAppVersionService sysAppVersionService;
    /**
     * 获取app版本信息 详细信息
     */
    @GetMapping("/{appName}")
    public Object getInfo(String appName)
    {
        SysAppVersion sysAppVersion =  sysAppVersionService.selectSysAppVersionById(appName);
        return JSONArray.toJSON(sysAppVersion);
    }
}
